<template>
  <BaseFrameSet class="home-frame-set">
    <template v-slot:page-att>
      <!-- home的导航栏 -->
      <div class="home-route-box flex">
        <router-link
        tag="div" class="home-route"
        v-for="route of homeMainNavArr" :key="route.name" :to="{name: route.name}">
          {{route.title}}
        </router-link>
      </div>
      <!-- home的导航栏 -->

    </template>
  </BaseFrameSet>
</template>

<script>
import BaseFrameSet from '__LAYOUTS__/base_frame_set/BaseFrameSet.vue'
export default {
  name: 'HomeFrameSet',
  components: {
    BaseFrameSet
  },
  computed: {
    homeMainNavArr() {
      return this.$router.options.routes.find((route)=>{
        return route.name === 'Home'
      }).children.map((route)=>{
        return {
          name: route.name,
          title: route.meta.title
        }
      })
    }
  },
  mounted() {

  }
}
</script>

<style lang="less">
  @import url('./home_frame_set.less');
</style>